model estimation using ergm.ego

Marriage/Cohab Network

note that these models don’t include a condition for degree in other network

Fit w/ Nodecov(age)

Pop = 5,000

fit.marcoh.nodecov <- ergm.ego(egodat_marcoh ~ edges + 
                         nodecov("age") + 
                         absdiff("sqrtage") + 
                         offset(nodematch("male", diff = FALSE)) +
                          offset("concurrent"), 
                         offset.coef = c(-Inf, -Inf),
                         control = control.ergm.ego(ppopsize = 5000))
## Warning in ergm.ego(egodat_marcoh ~ edges + nodecov("age") +
## absdiff("sqrtage") + : Using a smaller pseudopopulation size than sample
## size usually does not make sense.
## Constructing pseudopopulation network.
## Note: Constructed network has size 996, different from requested 5000. Estimation should not be meaningfully affected.
## Warning: `set_attrs()` is deprecated as of rlang 0.3.0
## This warning is displayed once per session.
## Unable to match target stats. Using MCMLE estimation.
## Starting maximum pseudolikelihood estimation (MPLE):
## Evaluating the predictor and response matrix.
## Maximizing the pseudolikelihood.
## Finished MPLE.
## Starting Monte Carlo maximum likelihood estimation (MCMLE):
## Iteration 1 of at most 20:
## Optimizing with step length 0.150042235315009.
## The log-likelihood improved by 3.986.
## Iteration 2 of at most 20:
## Optimizing with step length 0.184768394150753.
## The log-likelihood improved by 3.918.
## Iteration 3 of at most 20:
## Optimizing with step length 0.241719684674603.
## The log-likelihood improved by 3.803.
## Iteration 4 of at most 20:
## Optimizing with step length 0.318860018061737.
## The log-likelihood improved by 4.406.
## Iteration 5 of at most 20:
## Optimizing with step length 0.473848799904041.
## The log-likelihood improved by 3.96.
## Iteration 6 of at most 20:
## Optimizing with step length 0.803573190792369.
## The log-likelihood improved by 2.934.
## Iteration 7 of at most 20:
## Optimizing with step length 1.
## The log-likelihood improved by 0.1162.
## Step length converged once. Increasing MCMC sample size.
## Iteration 8 of at most 20:
## Optimizing with step length 1.
## The log-likelihood improved by 0.02746.
## Step length converged twice. Stopping.
## Finished MCMLE.
## This model was fit using MCMC.  To examine model diagnostics and
## check for degeneracy, use the mcmc.diagnostics() function.
saveRDS(fit.marcoh.nodecov, "~/Documents/Dissertation/R/Duration/Setup/fits/marcoh-nodecov.RDS")

fit.marcoh.nodecov.5000 <- readRDS("~/Documents/Dissertation/R/Duration/Setup/fits/marcoh-nodecov.RDS")

summary(fit.marcoh.nodecov.5000)
## 
## ==========================
## Summary of model fit
## ==========================
## 
## Formula:   egodat_marcoh ~ edges + nodecov("age") + absdiff("sqrtage") + 
##     offset(nodematch("male", diff = FALSE)) + offset("concurrent")
## 
## Iterations:  8 out of 20 
## 
## Monte Carlo MLE Results:
##                         Estimate Std. Error MCMC % z value Pr(>|z|)    
## offset(netsize.adj)    -6.903747   0.000000      0    -Inf   <1e-04 ***
## edges                   2.637319   0.094971      2  27.770   <1e-04 ***
## nodecov.age             0.001103   0.001487      1   0.742    0.458    
## absdiff.sqrtage        -3.051756   0.039284      3 -77.685   <1e-04 ***
## offset(nodematch.male)      -Inf   0.000000      0    -Inf   <1e-04 ***
## offset(concurrent)          -Inf   0.000000      0    -Inf   <1e-04 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
##  The following terms are fixed by offset and are not estimated:
##   offset(netsize.adj) offset(nodematch.male) offset(concurrent)
mcmc.diagnostics(fit.marcoh.nodecov.5000)
## Sample statistics summary:
## 
## Iterations = 16384:4209664
## Thinning interval = 1024 
## Number of chains = 1 
## Sample size per chain = 4096 
## 
## 1. Empirical mean and standard deviation for each variable,
##    plus standard error of the mean:
## 
##                     Mean      SD Naive SE Time-series SE
## edges            -0.3067   9.101  0.14220         0.3185
## nodecov.age     -24.8586 600.348  9.38043        21.0944
## absdiff.sqrtage  -1.0553   4.937  0.07714         0.1430
## 
## 2. Quantiles for each variable:
## 
##                     2.5%      25%       50%     75%    97.5%
## edges             -18.03   -7.025  -0.02524   5.975   16.975
## nodecov.age     -1171.25 -449.002 -20.75164 387.498 1140.623
## absdiff.sqrtage   -10.85   -4.394  -0.91784   2.420    8.337
## 
## 
## Sample statistics cross-correlations:
##                     edges nodecov.age absdiff.sqrtage
## edges           1.0000000   0.9663941       0.4906161
## nodecov.age     0.9663941   1.0000000       0.4581680
## absdiff.sqrtage 0.4906161   0.4581680       1.0000000
## 
## Sample statistics auto-correlation:
## Chain 1 
##              edges nodecov.age absdiff.sqrtage
## Lag 0    1.0000000   1.0000000      1.00000000
## Lag 1024 0.5856760   0.5946789      0.33310408
## Lag 2048 0.3996049   0.4076548      0.19314507
## Lag 3072 0.2959090   0.2984055      0.15922277
## Lag 4096 0.2163162   0.2174221      0.11174744
## Lag 5120 0.1529273   0.1494340      0.08566264
## 
## Sample statistics burn-in diagnostic (Geweke):
## Chain 1 
## 
## Fraction in 1st window = 0.1
## Fraction in 2nd window = 0.5 
## 
##           edges     nodecov.age absdiff.sqrtage 
##          0.5401          0.1175          0.3588 
## 
## Individual P-values (lower = worse):
##           edges     nodecov.age absdiff.sqrtage 
##       0.5891228       0.9064620       0.7197547 
## Joint P-value (lower = worse):  0.4514442 .

## 
## MCMC diagnostics shown here are from the last round of simulation, prior to computation of final parameter estimates. Because the final estimates are refinements of those used for this simulation run, these diagnostics may understate model performance. To directly assess the performance of the final model on in-model statistics, please use the GOF command: gof(ergmFitObject, GOF=~model).
plot(gof(fit.marcoh.nodecov.5000, GOF = "model"))

plot(gof(fit.marcoh.nodecov.5000, GOF = "degree"))

Pop = 10,000

fit.marcoh.nodecov.10 <- ergm.ego(egodat_marcoh ~ edges + 
                         nodecov("age") + 
                         absdiff("sqrtage") + 
                         offset(nodematch("male", diff = FALSE)) +
                         offset("concurrent"), 
                         offset.coef = c(-Inf, -Inf),
                         control = control.ergm.ego(ppopsize = 10000))
## Warning in ergm.ego(egodat_marcoh ~ edges + nodecov("age") +
## absdiff("sqrtage") + : Using a smaller pseudopopulation size than sample
## size usually does not make sense.
## Constructing pseudopopulation network.
## Note: Constructed network has size 5006, different from requested 10000. Estimation should not be meaningfully affected.
## Unable to match target stats. Using MCMLE estimation.
## Starting maximum pseudolikelihood estimation (MPLE):
## Evaluating the predictor and response matrix.
## Maximizing the pseudolikelihood.
## Finished MPLE.
## Starting Monte Carlo maximum likelihood estimation (MCMLE):
## Iteration 1 of at most 20:
## Optimizing with step length 0.0591582553253478.
## The log-likelihood improved by 3.474.
## Iteration 2 of at most 20:
## Optimizing with step length 0.0648223360165142.
## The log-likelihood improved by 3.797.
## Iteration 3 of at most 20:
## Optimizing with step length 0.0769241182426149.
## The log-likelihood improved by 3.914.
## Iteration 4 of at most 20:
## Optimizing with step length 0.0889819306858537.
## The log-likelihood improved by 3.824.
## Iteration 5 of at most 20:
## Optimizing with step length 0.0907723196496665.
## The log-likelihood improved by 3.552.
## Iteration 6 of at most 20:
## Optimizing with step length 0.124817502605916.
## The log-likelihood improved by 4.689.
## Iteration 7 of at most 20:
## Optimizing with step length 0.12169086622455.
## The log-likelihood improved by 3.093.
## Iteration 8 of at most 20:
## Optimizing with step length 0.143899982757126.
## The log-likelihood improved by 3.85.
## Iteration 9 of at most 20:
## Optimizing with step length 0.143084250766046.
## The log-likelihood improved by 3.208.
## Iteration 10 of at most 20:
## Optimizing with step length 0.158818583800834.
## The log-likelihood improved by 2.763.
## Iteration 11 of at most 20:
## Optimizing with step length 0.205505648187867.
## The log-likelihood improved by 2.865.
## Iteration 12 of at most 20:
## Optimizing with step length 0.310967888679275.
## The log-likelihood improved by 3.357.
## Iteration 13 of at most 20:
## Optimizing with step length 0.408100129010225.
## The log-likelihood improved by 3.375.
## Iteration 14 of at most 20:
## Optimizing with step length 0.612143534458838.
## The log-likelihood improved by 4.049.
## Iteration 15 of at most 20:
## Optimizing with step length 1.
## The log-likelihood improved by 1.631.
## Step length converged once. Increasing MCMC sample size.
## Iteration 16 of at most 20:
## Optimizing with step length 1.
## The log-likelihood improved by 0.05173.
## Step length converged twice. Stopping.
## Finished MCMLE.
## This model was fit using MCMC.  To examine model diagnostics and
## check for degeneracy, use the mcmc.diagnostics() function.
saveRDS(fit.marcoh.nodecov.10, "~/Documents/Dissertation/R/Duration/Setup/fits/marcoh-nodecov-10.RDS")

fit.marcoh.nodecov.10 <- readRDS("~/Documents/Dissertation/R/Duration/Setup/fits/marcoh-nodecov-10.RDS")

summary(fit.marcoh.nodecov.10)
## 
## ==========================
## Summary of model fit
## ==========================
## 
## Formula:   egodat_marcoh ~ edges + nodecov("age") + absdiff("sqrtage") + 
##     offset(nodematch("male", diff = FALSE)) + offset("concurrent")
## 
## Iterations:  16 out of 20 
## 
## Monte Carlo MLE Results:
##                         Estimate Std. Error MCMC % z value Pr(>|z|)    
## offset(netsize.adj)    -8.518392   0.000000      0    -Inf   <1e-04 ***
## edges                   0.867611   0.107857      1   8.044   <1e-04 ***
## nodecov.age             0.030163   0.001748      1  17.256   <1e-04 ***
## absdiff.sqrtage        -3.083225   0.041778      1 -73.800   <1e-04 ***
## offset(nodematch.male)      -Inf   0.000000      0    -Inf   <1e-04 ***
## offset(concurrent)          -Inf   0.000000      0    -Inf   <1e-04 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
##  The following terms are fixed by offset and are not estimated:
##   offset(netsize.adj) offset(nodematch.male) offset(concurrent)
mcmc.diagnostics(fit.marcoh.nodecov.10)
## Sample statistics summary:
## 
## Iterations = 16384:4209664
## Thinning interval = 1024 
## Number of chains = 1 
## Sample size per chain = 4096 
## 
## 1. Empirical mean and standard deviation for each variable,
##    plus standard error of the mean:
## 
##                     Mean      SD Naive SE Time-series SE
## edges             -4.460   19.20   0.3000          1.414
## nodecov.age     -347.269 1241.79  19.4030        101.744
## absdiff.sqrtage   -1.428   10.47   0.1635          0.532
## 
## 2. Quantiles for each variable:
## 
##                     2.5%       25%      50%     75%   97.5%
## edges             -40.83   -17.201   -5.201   7.799   33.80
## nodecov.age     -2695.86 -1163.858 -366.858 458.392 2197.39
## absdiff.sqrtage   -23.22    -8.319   -1.146   5.765   17.86
## 
## 
## Sample statistics cross-correlations:
##                     edges nodecov.age absdiff.sqrtage
## edges           1.0000000   0.9655889       0.4434295
## nodecov.age     0.9655889   1.0000000       0.3987311
## absdiff.sqrtage 0.4434295   0.3987311       1.0000000
## 
## Sample statistics auto-correlation:
## Chain 1 
##              edges nodecov.age absdiff.sqrtage
## Lag 0    1.0000000   1.0000000       1.0000000
## Lag 1024 0.8720926   0.8901068       0.7558804
## Lag 2048 0.7696055   0.8003449       0.5870290
## Lag 3072 0.6911096   0.7322043       0.4736310
## Lag 4096 0.6236552   0.6726041       0.3943862
## Lag 5120 0.5744464   0.6292782       0.3427052
## 
## Sample statistics burn-in diagnostic (Geweke):
## Chain 1 
## 
## Fraction in 1st window = 0.1
## Fraction in 2nd window = 0.5 
## 
##           edges     nodecov.age absdiff.sqrtage 
##         -0.2886         -0.2572          0.2044 
## 
## Individual P-values (lower = worse):
##           edges     nodecov.age absdiff.sqrtage 
##       0.7728602       0.7969877       0.8380190 
## Joint P-value (lower = worse):  0.985404 .

## 
## MCMC diagnostics shown here are from the last round of simulation, prior to computation of final parameter estimates. Because the final estimates are refinements of those used for this simulation run, these diagnostics may understate model performance. To directly assess the performance of the final model on in-model statistics, please use the GOF command: gof(ergmFitObject, GOF=~model).
plot(gof(fit.marcoh.nodecov.10, GOF = "model"))

plot(gof(fit.marcoh.nodecov.10, GOF = "degree"))

Pop = 20,000

fit.marcoh.nodecov.20 <- ergm.ego(egodat_marcoh ~ edges + 
                         nodecov("age") + 
                         absdiff("sqrtage") + 
                         offset(nodematch("male", diff = FALSE)) +
                         offset("concurrent"), 
                         offset.coef = c(-Inf, -Inf),
                         control = control.ergm.ego(ppopsize = 20000, ergm.control = control.ergm(MCMLE.maxit = 100)))
## Warning in ergm.ego(egodat_marcoh ~ edges + nodecov("age") +
## absdiff("sqrtage") + : Using a smaller pseudopopulation size than sample
## size usually does not make sense.
## Constructing pseudopopulation network.
## Note: Constructed network has size 15250, different from requested 20000. Estimation should not be meaningfully affected.
## Unable to match target stats. Using MCMLE estimation.
## Starting maximum pseudolikelihood estimation (MPLE):
## Evaluating the predictor and response matrix.
## Maximizing the pseudolikelihood.
## Finished MPLE.
## Starting Monte Carlo maximum likelihood estimation (MCMLE):
## Iteration 1 of at most 100:
## Optimizing with step length 0.0342073531590534.
## The log-likelihood improved by 3.651.
## Iteration 2 of at most 100:
## Optimizing with step length 0.0368780104748084.
## The log-likelihood improved by 4.135.
## Iteration 3 of at most 100:
## Optimizing with step length 0.0331072743074978.
## The log-likelihood improved by 2.085.
## Iteration 4 of at most 100:
## Optimizing with step length 0.0383696071667242.
## The log-likelihood improved by 3.347.
## Iteration 5 of at most 100:
## Optimizing with step length 0.033236621402204.
## The log-likelihood improved by 2.554.
## Iteration 6 of at most 100:
## Optimizing with step length 0.0351892707955161.
## The log-likelihood improved by 2.568.
## Iteration 7 of at most 100:
## Optimizing with step length 0.0514152205687653.
## The log-likelihood improved by 3.943.
## Iteration 8 of at most 100:
## Optimizing with step length 0.043573178023531.
## The log-likelihood improved by 3.118.
## Iteration 9 of at most 100:
## Optimizing with step length 0.0549693383362363.
## The log-likelihood improved by 2.957.
## Iteration 10 of at most 100:
## Optimizing with step length 0.0431393792190266.
## The log-likelihood improved by 2.91.
## Iteration 11 of at most 100:
## Optimizing with step length 0.0459161773889357.
## The log-likelihood improved by 2.291.
## Iteration 12 of at most 100:
## Optimizing with step length 0.0520037642683399.
## The log-likelihood improved by 3.209.
## Iteration 13 of at most 100:
## Optimizing with step length 0.0619969935861979.
## The log-likelihood improved by 2.462.
## Iteration 14 of at most 100:
## Optimizing with step length 0.0678492998688997.
## The log-likelihood improved by 2.736.
## Iteration 15 of at most 100:
## Optimizing with step length 0.0567557691487198.
## The log-likelihood improved by 2.476.
## Iteration 16 of at most 100:
## Optimizing with step length 0.0881004127452315.
## The log-likelihood improved by 4.344.
## Iteration 17 of at most 100:
## Optimizing with step length 0.0959876744419226.
## The log-likelihood improved by 3.6.
## Iteration 18 of at most 100:
## Optimizing with step length 0.0905414610044193.
## The log-likelihood improved by 2.931.
## Iteration 19 of at most 100:
## Optimizing with step length 0.135727782876339.
## The log-likelihood improved by 4.055.
## Iteration 20 of at most 100:
## Optimizing with step length 0.117085639980348.
## The log-likelihood improved by 3.22.
## Iteration 21 of at most 100:
## Optimizing with step length 0.144280693365455.
## The log-likelihood improved by 3.25.
## Iteration 22 of at most 100:
## Optimizing with step length 0.176862066242742.
## The log-likelihood improved by 2.712.
## Iteration 23 of at most 100:
## Optimizing with step length 0.189311755049649.
## The log-likelihood improved by 2.948.
## Iteration 24 of at most 100:
## Optimizing with step length 0.262724580666936.
## The log-likelihood improved by 2.885.
## Iteration 25 of at most 100:
## Optimizing with step length 0.253378759449056.
## The log-likelihood improved by 2.439.
## Iteration 26 of at most 100:
## Optimizing with step length 0.372049530334089.
## The log-likelihood improved by 2.17.
## Iteration 27 of at most 100:
## Optimizing with step length 0.691218460665044.
## The log-likelihood improved by 2.305.
## Iteration 28 of at most 100:
## Optimizing with step length 1.
## The log-likelihood improved by 0.6534.
## Step length converged once. Increasing MCMC sample size.
## Iteration 29 of at most 100:
## Optimizing with step length 1.
## The log-likelihood improved by 0.5366.
## Step length converged twice. Stopping.
## Finished MCMLE.
## This model was fit using MCMC.  To examine model diagnostics and
## check for degeneracy, use the mcmc.diagnostics() function.
saveRDS(fit.marcoh.nodecov.20, "~/Documents/Dissertation/R/Duration/Setup/fits/marcoh-nodecov-20.RDS")

fit.marcoh.nodecov.20 <- readRDS("~/Documents/Dissertation/R/Duration/Setup/fits/marcoh-nodecov-20.RDS")

summary(fit.marcoh.nodecov.20)
## 
## ==========================
## Summary of model fit
## ==========================
## 
## Formula:   egodat_marcoh ~ edges + nodecov("age") + absdiff("sqrtage") + 
##     offset(nodematch("male", diff = FALSE)) + offset("concurrent")
## 
## Iterations:  29 out of 100 
## 
## Monte Carlo MLE Results:
##                         Estimate Std. Error MCMC % z value Pr(>|z|)    
## offset(netsize.adj)    -9.632335   0.000000      0    -Inf   <1e-04 ***
## edges                   0.052876   0.113834      1   0.464    0.642    
## nodecov.age             0.044424   0.001927      1  23.049   <1e-04 ***
## absdiff.sqrtage        -3.073709   0.062027      1 -49.554   <1e-04 ***
## offset(nodematch.male)      -Inf   0.000000      0    -Inf   <1e-04 ***
## offset(concurrent)          -Inf   0.000000      0    -Inf   <1e-04 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
##  The following terms are fixed by offset and are not estimated:
##   offset(netsize.adj) offset(nodematch.male) offset(concurrent)
mcmc.diagnostics(fit.marcoh.nodecov.20)
## Sample statistics summary:
## 
## Iterations = 16384:4209664
## Thinning interval = 1024 
## Number of chains = 1 
## Sample size per chain = 4096 
## 
## 1. Empirical mean and standard deviation for each variable,
##    plus standard error of the mean:
## 
##                    Mean      SD Naive SE Time-series SE
## edges             -6.92   33.81   0.5282          3.556
## nodecov.age     -238.12 2155.49  33.6795        252.337
## absdiff.sqrtage   10.62   16.70   0.2609          1.107
## 
## 2. Quantiles for each variable:
## 
##                     2.5%       25%      50%     75%   97.5%
## edges             -72.73   -30.734   -5.734   17.27   57.27
## nodecov.age     -4521.99 -1767.735 -157.235 1355.26 3758.01
## absdiff.sqrtage   -20.91    -1.059   10.409   22.47   42.67
## 
## 
## Sample statistics cross-correlations:
##                     edges nodecov.age absdiff.sqrtage
## edges           1.0000000   0.9686980       0.6071024
## nodecov.age     0.9686980   1.0000000       0.5907839
## absdiff.sqrtage 0.6071024   0.5907839       1.0000000
## 
## Sample statistics auto-correlation:
## Chain 1 
##              edges nodecov.age absdiff.sqrtage
## Lag 0    1.0000000   1.0000000       1.0000000
## Lag 1024 0.9538279   0.9626760       0.8946665
## Lag 2048 0.9128547   0.9291189       0.8034705
## Lag 3072 0.8747716   0.8974731       0.7247423
## Lag 4096 0.8377046   0.8661729       0.6536490
## Lag 5120 0.8048808   0.8381512       0.5893482
## 
## Sample statistics burn-in diagnostic (Geweke):
## Chain 1 
## 
## Fraction in 1st window = 0.1
## Fraction in 2nd window = 0.5 
## 
##           edges     nodecov.age absdiff.sqrtage 
##          -1.019          -0.853          -2.270 
## 
## Individual P-values (lower = worse):
##           edges     nodecov.age absdiff.sqrtage 
##      0.30824083      0.39366713      0.02323372 
## Joint P-value (lower = worse):  0.2219269 .

## 
## MCMC diagnostics shown here are from the last round of simulation, prior to computation of final parameter estimates. Because the final estimates are refinements of those used for this simulation run, these diagnostics may understate model performance. To directly assess the performance of the final model on in-model statistics, please use the GOF command: gof(ergmFitObject, GOF=~model).
plot(gof(fit.marcoh.nodecov.20, GOF = "model"))

plot(gof(fit.marcoh.nodecov.20, GOF = "degree"))

Fit w/ Nodefactor(agecat)

Pop = 5,000

## Warning in ergm.ego(egodat_marcoh ~ edges + nodefactor("agecat", levels =
## c(1:3)) + : Using a smaller pseudopopulation size than sample size usually
## does not make sense.
## Constructing pseudopopulation network.
## Note: Constructed network has size 996, different from requested 5000. Estimation should not be meaningfully affected.
## Unable to match target stats. Using MCMLE estimation.
## Starting maximum pseudolikelihood estimation (MPLE):
## Evaluating the predictor and response matrix.
## Maximizing the pseudolikelihood.
## Finished MPLE.
## Starting Monte Carlo maximum likelihood estimation (MCMLE):
## Iteration 1 of at most 20:
## Optimizing with step length 0.138664135039476.
## The log-likelihood improved by 4.545.
## Iteration 2 of at most 20:
## Optimizing with step length 0.153716395299718.
## The log-likelihood improved by 3.479.
## Iteration 3 of at most 20:
## Optimizing with step length 0.196039028519132.
## The log-likelihood improved by 3.248.
## Iteration 4 of at most 20:
## Optimizing with step length 0.292264655747309.
## The log-likelihood improved by 4.671.
## Iteration 5 of at most 20:
## Optimizing with step length 0.386332612059242.
## The log-likelihood improved by 3.993.
## Iteration 6 of at most 20:
## Optimizing with step length 0.566458089107911.
## The log-likelihood improved by 3.2.
## Iteration 7 of at most 20:
## Optimizing with step length 1.
## The log-likelihood improved by 2.088.
## Step length converged once. Increasing MCMC sample size.
## Iteration 8 of at most 20:
## Optimizing with step length 1.
## The log-likelihood improved by 0.01264.
## Step length converged twice. Stopping.
## Finished MCMLE.
## This model was fit using MCMC.  To examine model diagnostics and
## check for degeneracy, use the mcmc.diagnostics() function.
## 
## ==========================
## Summary of model fit
## ==========================
## 
## Formula:   egodat_marcoh ~ edges + nodefactor("agecat", levels = c(1:3)) + 
##     absdiff("sqrtage") + offset(nodematch("male", diff = FALSE)) + 
##     offset("concurrent")
## 
## Iterations:  8 out of 20 
## 
## Monte Carlo MLE Results:
##                        Estimate Std. Error MCMC % z value Pr(>|z|)    
## offset(netsize.adj)    -6.90375    0.00000      0    -Inf   <1e-04 ***
## edges                   2.81591    0.04323      1   65.14   <1e-04 ***
## nodefactor.agecat.1    -1.39817    0.07052      1  -19.82   <1e-04 ***
## nodefactor.agecat.2    -0.44070    0.04170      1  -10.57   <1e-04 ***
## nodefactor.agecat.3     0.77052    0.07314      1   10.54   <1e-04 ***
## absdiff.sqrtage        -3.01466    0.04929      3  -61.16   <1e-04 ***
## offset(nodematch.male)     -Inf    0.00000      0    -Inf   <1e-04 ***
## offset(concurrent)         -Inf    0.00000      0    -Inf   <1e-04 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
##  The following terms are fixed by offset and are not estimated:
##   offset(netsize.adj) offset(nodematch.male) offset(concurrent)
## Sample statistics summary:
## 
## Iterations = 16384:4209664
## Thinning interval = 1024 
## Number of chains = 1 
## Sample size per chain = 4096 
## 
## 1. Empirical mean and standard deviation for each variable,
##    plus standard error of the mean:
## 
##                         Mean    SD Naive SE Time-series SE
## edges                0.93398 7.996  0.12494        0.24197
## nodefactor.agecat.1  0.03991 2.775  0.04336        0.05455
## nodefactor.agecat.2  0.50836 6.569  0.10264        0.24475
## nodefactor.agecat.3  0.28465 5.375  0.08398        0.24698
## absdiff.sqrtage     -0.09904 4.569  0.07140        0.16112
## 
## 2. Quantiles for each variable:
## 
##                        2.5%    25%      50%   75%  97.5%
## edges               -15.025 -4.025  0.97476 5.975 16.975
## nodefactor.agecat.1  -5.710 -1.710  0.29015 2.290  4.290
## nodefactor.agecat.2 -12.397 -4.397  0.60259 5.603 13.603
## nodefactor.agecat.3 -10.225 -3.225 -0.22462 3.775 10.775
## absdiff.sqrtage      -9.241 -3.126 -0.08307 3.077  8.723
## 
## 
## Sample statistics cross-correlations:
##                         edges nodefactor.agecat.1 nodefactor.agecat.2
## edges               1.0000000          0.22366094          0.41540263
## nodefactor.agecat.1 0.2236609          1.00000000          0.07525687
## nodefactor.agecat.2 0.4154026          0.07525687          1.00000000
## nodefactor.agecat.3 0.3186299         -0.01691419          0.02322470
## absdiff.sqrtage     0.5322287          0.16647922          0.24091123
##                     nodefactor.agecat.3 absdiff.sqrtage
## edges                        0.31862994       0.5322287
## nodefactor.agecat.1         -0.01691419       0.1664792
## nodefactor.agecat.2          0.02322470       0.2409112
## nodefactor.agecat.3          1.00000000       0.2035769
## absdiff.sqrtage              0.20357690       1.0000000
## 
## Sample statistics auto-correlation:
## Chain 1 
##               edges nodefactor.agecat.1 nodefactor.agecat.2
## Lag 0    1.00000000          1.00000000           1.0000000
## Lag 1024 0.53484504          0.22550351           0.5992209
## Lag 2048 0.33158932          0.05973604           0.4135625
## Lag 3072 0.20771423          0.02120235           0.2944970
## Lag 4096 0.13684739          0.02477597           0.2171836
## Lag 5120 0.09342227          0.01826479           0.1641331
##          nodefactor.agecat.3 absdiff.sqrtage
## Lag 0              1.0000000       1.0000000
## Lag 1024           0.7101414       0.3926225
## Lag 2048           0.5564489       0.2537075
## Lag 3072           0.4530715       0.1738270
## Lag 4096           0.3789662       0.1688949
## Lag 5120           0.3140504       0.1434649
## 
## Sample statistics burn-in diagnostic (Geweke):
## Chain 1 
## 
## Fraction in 1st window = 0.1
## Fraction in 2nd window = 0.5 
## 
##               edges nodefactor.agecat.1 nodefactor.agecat.2 
##              0.3424             -0.2947              1.3294 
## nodefactor.agecat.3     absdiff.sqrtage 
##             -1.4618              0.3372 
## 
## Individual P-values (lower = worse):
##               edges nodefactor.agecat.1 nodefactor.agecat.2 
##           0.7320541           0.7682582           0.1837083 
## nodefactor.agecat.3     absdiff.sqrtage 
##           0.1437867           0.7359551 
## Joint P-value (lower = worse):  0.5852956 .

## 
## MCMC diagnostics shown here are from the last round of simulation, prior to computation of final parameter estimates. Because the final estimates are refinements of those used for this simulation run, these diagnostics may understate model performance. To directly assess the performance of the final model on in-model statistics, please use the GOF command: gof(ergmFitObject, GOF=~model).

Pop = 10,000

## Warning in ergm.ego(egodat_marcoh ~ edges + nodefactor("agecat", levels =
## c(1:3)) + : Using a smaller pseudopopulation size than sample size usually
## does not make sense.
## Constructing pseudopopulation network.
## Note: Constructed network has size 5006, different from requested 10000. Estimation should not be meaningfully affected.
## Unable to match target stats. Using MCMLE estimation.
## Starting maximum pseudolikelihood estimation (MPLE):
## Evaluating the predictor and response matrix.
## Maximizing the pseudolikelihood.
## Finished MPLE.
## Starting Monte Carlo maximum likelihood estimation (MCMLE):
## Iteration 1 of at most 20:
## Optimizing with step length 0.0466144665741913.
## The log-likelihood improved by 2.913.
## Iteration 2 of at most 20:
## Optimizing with step length 0.0603402802034657.
## The log-likelihood improved by 3.625.
## Iteration 3 of at most 20:
## Optimizing with step length 0.0599150205609965.
## The log-likelihood improved by 2.821.
## Iteration 4 of at most 20:
## Optimizing with step length 0.0725939423739697.
## The log-likelihood improved by 3.232.
## Iteration 5 of at most 20:
## Optimizing with step length 0.0775541246194489.
## The log-likelihood improved by 3.446.
## Iteration 6 of at most 20:
## Optimizing with step length 0.0882368124422177.
## The log-likelihood improved by 3.415.
## Iteration 7 of at most 20:
## Optimizing with step length 0.108669924208481.
## The log-likelihood improved by 4.728.
## Iteration 8 of at most 20:
## Optimizing with step length 0.115116400630009.
## The log-likelihood improved by 3.681.
## Iteration 9 of at most 20:
## Optimizing with step length 0.123601007461258.
## The log-likelihood improved by 3.097.
## Iteration 10 of at most 20:
## Optimizing with step length 0.180630398545434.
## The log-likelihood improved by 3.949.
## Iteration 11 of at most 20:
## Optimizing with step length 0.145712046081762.
## The log-likelihood improved by 3.01.
## Iteration 12 of at most 20:
## Optimizing with step length 0.196711055257145.
## The log-likelihood improved by 3.209.
## Iteration 13 of at most 20:
## Optimizing with step length 0.231854433769991.
## The log-likelihood improved by 2.804.
## Iteration 14 of at most 20:
## Optimizing with step length 0.343516127788765.
## The log-likelihood improved by 2.948.
## Iteration 15 of at most 20:
## Optimizing with step length 0.517242343767213.
## The log-likelihood improved by 3.523.
## Iteration 16 of at most 20:
## Optimizing with step length 0.876462464387922.
## The log-likelihood improved by 2.688.
## Iteration 17 of at most 20:
## Optimizing with step length 1.
## The log-likelihood improved by 0.6248.
## Step length converged once. Increasing MCMC sample size.
## Iteration 18 of at most 20:
## Optimizing with step length 1.
## The log-likelihood improved by 0.213.
## Step length converged twice. Stopping.
## Finished MCMLE.
## This model was fit using MCMC.  To examine model diagnostics and
## check for degeneracy, use the mcmc.diagnostics() function.
## 
## ==========================
## Summary of model fit
## ==========================
## 
## Formula:   egodat_marcoh ~ edges + nodefactor("agecat", levels = c(1:3)) + 
##     absdiff("sqrtage") + offset(nodematch("male", diff = FALSE)) + 
##     offset("concurrent")
## 
## Iterations:  18 out of 20 
## 
## Monte Carlo MLE Results:
##                        Estimate Std. Error MCMC % z value Pr(>|z|)    
## offset(netsize.adj)    -8.51839    0.00000      0    -Inf  < 1e-04 ***
## edges                   3.15648    0.05056      1   62.44  < 1e-04 ***
## nodefactor.agecat.1    -1.82310    0.06772      0  -26.92  < 1e-04 ***
## nodefactor.agecat.2    -0.62319    0.04952      1  -12.59  < 1e-04 ***
## nodefactor.agecat.3     0.15856    0.06052      1    2.62  0.00879 ** 
## absdiff.sqrtage        -3.06049    0.04478      1  -68.34  < 1e-04 ***
## offset(nodematch.male)     -Inf    0.00000      0    -Inf  < 1e-04 ***
## offset(concurrent)         -Inf    0.00000      0    -Inf  < 1e-04 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
##  The following terms are fixed by offset and are not estimated:
##   offset(netsize.adj) offset(nodematch.male) offset(concurrent)
## Sample statistics summary:
## 
## Iterations = 16384:4209664
## Thinning interval = 1024 
## Number of chains = 1 
## Sample size per chain = 4096 
## 
## 1. Empirical mean and standard deviation for each variable,
##    plus standard error of the mean:
## 
##                        Mean     SD Naive SE Time-series SE
## edges                8.3533 18.748   0.2929         1.3037
## nodefactor.agecat.1 -1.3040  6.402   0.1000         0.2252
## nodefactor.agecat.2  0.5920 14.864   0.2323         1.0072
## nodefactor.agecat.3  1.4744 14.271   0.2230         1.3126
## absdiff.sqrtage      0.1265 10.279   0.1606         0.5061
## 
## 2. Quantiles for each variable:
## 
##                       2.5%    25%     50%    75% 97.5%
## edges               -28.20 -4.201  8.7988 20.799 45.80
## nodefactor.agecat.1 -14.39 -5.385 -1.3850  3.615 10.61
## nodefactor.agecat.2 -27.64 -9.640  0.3600 10.360 30.36
## nodefactor.agecat.3 -26.60 -7.597  1.4032 11.403 29.40
## absdiff.sqrtage     -21.12 -6.310  0.3682  6.802 19.72
## 
## 
## Sample statistics cross-correlations:
##                         edges nodefactor.agecat.1 nodefactor.agecat.2
## edges               1.0000000         0.209554247          0.52686490
## nodefactor.agecat.1 0.2095542         1.000000000          0.08133085
## nodefactor.agecat.2 0.5268649         0.081330850          1.00000000
## nodefactor.agecat.3 0.4590529        -0.002936471          0.10252669
## absdiff.sqrtage     0.4719611         0.168048541          0.22192872
##                     nodefactor.agecat.3 absdiff.sqrtage
## edges                       0.459052880       0.4719611
## nodefactor.agecat.1        -0.002936471       0.1680485
## nodefactor.agecat.2         0.102526688       0.2219287
## nodefactor.agecat.3         1.000000000       0.2686391
## absdiff.sqrtage             0.268639115       1.0000000
## 
## Sample statistics auto-correlation:
## Chain 1 
##              edges nodefactor.agecat.1 nodefactor.agecat.2
## Lag 0    1.0000000           1.0000000           1.0000000
## Lag 1024 0.8741026           0.6702266           0.8834002
## Lag 2048 0.7797502           0.4451344           0.7882781
## Lag 3072 0.7022815           0.2980086           0.7118037
## Lag 4096 0.6411980           0.2149504           0.6440391
## Lag 5120 0.5863105           0.1600178           0.5852274
##          nodefactor.agecat.3 absdiff.sqrtage
## Lag 0              1.0000000       1.0000000
## Lag 1024           0.9124824       0.7808686
## Lag 2048           0.8411940       0.6237096
## Lag 3072           0.7818052       0.5065533
## Lag 4096           0.7308717       0.4263601
## Lag 5120           0.6911989       0.3634459
## 
## Sample statistics burn-in diagnostic (Geweke):
## Chain 1 
## 
## Fraction in 1st window = 0.1
## Fraction in 2nd window = 0.5 
## 
##               edges nodefactor.agecat.1 nodefactor.agecat.2 
##             -0.4987             -1.2307             -4.7512 
## nodefactor.agecat.3     absdiff.sqrtage 
##              3.1402              0.7617 
## 
## Individual P-values (lower = worse):
##               edges nodefactor.agecat.1 nodefactor.agecat.2 
##        6.180045e-01        2.184344e-01        2.021785e-06 
## nodefactor.agecat.3     absdiff.sqrtage 
##        1.688351e-03        4.462135e-01 
## Joint P-value (lower = worse):  1.378772e-06 .

## 
## MCMC diagnostics shown here are from the last round of simulation, prior to computation of final parameter estimates. Because the final estimates are refinements of those used for this simulation run, these diagnostics may understate model performance. To directly assess the performance of the final model on in-model statistics, please use the GOF command: gof(ergmFitObject, GOF=~model).

Pop = 20,000

## Warning in ergm.ego(egodat_marcoh ~ edges + nodefactor("agecat", levels =
## c(1:3)) + : Using a smaller pseudopopulation size than sample size usually
## does not make sense.
## Constructing pseudopopulation network.
## Note: Constructed network has size 15250, different from requested 20000. Estimation should not be meaningfully affected.
## Unable to match target stats. Using MCMLE estimation.
## Starting maximum pseudolikelihood estimation (MPLE):
## Evaluating the predictor and response matrix.
## Maximizing the pseudolikelihood.
## Finished MPLE.
## Starting Monte Carlo maximum likelihood estimation (MCMLE):
## Iteration 1 of at most 100:
## Optimizing with step length 0.027873167438293.
## The log-likelihood improved by 2.907.
## Iteration 2 of at most 100:
## Optimizing with step length 0.0323420172441747.
## The log-likelihood improved by 3.661.
## Iteration 3 of at most 100:
## Optimizing with step length 0.0247528021364617.
## The log-likelihood improved by 2.127.
## Iteration 4 of at most 100:
## Optimizing with step length 0.0367763085664953.
## The log-likelihood improved by 4.219.
## Iteration 5 of at most 100:
## Optimizing with step length 0.03470863938905.
## The log-likelihood improved by 3.355.
## Iteration 6 of at most 100:
## Optimizing with step length 0.03372154110786.
## The log-likelihood improved by 2.607.
## Iteration 7 of at most 100:
## Optimizing with step length 0.0320368427795113.
## The log-likelihood improved by 2.498.
## Iteration 8 of at most 100:
## Optimizing with step length 0.0390603752148347.
## The log-likelihood improved by 2.619.
## Iteration 9 of at most 100:
## Optimizing with step length 0.0381537707928936.
## The log-likelihood improved by 2.387.
## Iteration 10 of at most 100:
## Optimizing with step length 0.0485663680101388.
## The log-likelihood improved by 3.279.
## Iteration 11 of at most 100:
## Optimizing with step length 0.0399393953396098.
## The log-likelihood improved by 2.83.
## Iteration 12 of at most 100:
## Optimizing with step length 0.0463526830957157.
## The log-likelihood improved by 2.612.
## Iteration 13 of at most 100:
## Optimizing with step length 0.0528851819311443.
## The log-likelihood improved by 3.474.
## Iteration 14 of at most 100:
## Optimizing with step length 0.053773582757262.
## The log-likelihood improved by 2.913.
## Iteration 15 of at most 100:
## Optimizing with step length 0.0572467238743115.
## The log-likelihood improved by 2.856.
## Iteration 16 of at most 100:
## Optimizing with step length 0.0518456377319033.
## The log-likelihood improved by 2.396.
## Iteration 17 of at most 100:
## Optimizing with step length 0.0703217728096083.
## The log-likelihood improved by 2.403.
## Iteration 18 of at most 100:
## Optimizing with step length 0.0562519351018623.
## The log-likelihood improved by 2.059.
## Iteration 19 of at most 100:
## Optimizing with step length 0.0956289477639831.
## The log-likelihood improved by 4.034.
## Iteration 20 of at most 100:
## Optimizing with step length 0.0831273784389472.
## The log-likelihood improved by 3.193.
## Iteration 21 of at most 100:
## Optimizing with step length 0.0885680676533335.
## The log-likelihood improved by 3.28.
## Iteration 22 of at most 100:
## Optimizing with step length 0.0852599927827676.
## The log-likelihood improved by 2.703.
## Iteration 23 of at most 100:
## Optimizing with step length 0.12865699754835.
## The log-likelihood improved by 4.069.
## Iteration 24 of at most 100:
## Optimizing with step length 0.111126883118054.
## The log-likelihood improved by 1.832.
## Iteration 25 of at most 100:
## Optimizing with step length 0.207129661926247.
## The log-likelihood improved by 1.916.
## Iteration 26 of at most 100:
## Optimizing with step length 0.243180894809406.
## The log-likelihood improved by 2.595.
## Iteration 27 of at most 100:
## Optimizing with step length 0.260101310836516.
## The log-likelihood improved by 1.875.
## Iteration 28 of at most 100:
## Optimizing with step length 0.39698555147253.
## The log-likelihood improved by 2.932.
## Iteration 29 of at most 100:
## Optimizing with step length 0.592521890725415.
## The log-likelihood improved by 3.314.
## Iteration 30 of at most 100:
## Optimizing with step length 0.790466834696432.
## The log-likelihood improved by 2.347.
## Iteration 31 of at most 100:
## Optimizing with step length 1.
## The log-likelihood improved by 1.506.
## Step length converged once. Increasing MCMC sample size.
## Iteration 32 of at most 100:
## Optimizing with step length 1.
## The log-likelihood improved by 0.7476.
## Step length converged twice. Stopping.
## Finished MCMLE.
## This model was fit using MCMC.  To examine model diagnostics and
## check for degeneracy, use the mcmc.diagnostics() function.
## 
## ==========================
## Summary of model fit
## ==========================
## 
## Formula:   egodat_marcoh ~ edges + nodefactor("agecat", levels = c(1:3)) + 
##     absdiff("sqrtage") + offset(nodematch("male", diff = FALSE)) + 
##     offset("concurrent")
## 
## Iterations:  32 out of 100 
## 
## Monte Carlo MLE Results:
##                        Estimate Std. Error MCMC % z value Pr(>|z|)    
## offset(netsize.adj)    -9.63233    0.00000      0    -Inf   <1e-04 ***
## edges                   3.36280    0.05922      1  56.789   <1e-04 ***
## nodefactor.agecat.1    -2.14444    0.07060      0 -30.374   <1e-04 ***
## nodefactor.agecat.2    -0.75494    0.05460      0 -13.827   <1e-04 ***
## nodefactor.agecat.3     0.09973    0.05397      1   1.848   0.0646 .  
## absdiff.sqrtage        -3.09290    0.06599      1 -46.869   <1e-04 ***
## offset(nodematch.male)     -Inf    0.00000      0    -Inf   <1e-04 ***
## offset(concurrent)         -Inf    0.00000      0    -Inf   <1e-04 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
##  The following terms are fixed by offset and are not estimated:
##   offset(netsize.adj) offset(nodematch.male) offset(concurrent)
## Sample statistics summary:
## 
## Iterations = 16384:4209664
## Thinning interval = 1024 
## Number of chains = 1 
## Sample size per chain = 4096 
## 
## 1. Empirical mean and standard deviation for each variable,
##    plus standard error of the mean:
## 
##                        Mean    SD Naive SE Time-series SE
## edges               32.0200 35.32   0.5518         4.4356
## nodefactor.agecat.1 -1.7539 10.83   0.1692         0.6116
## nodefactor.agecat.2 -0.8251 26.99   0.4217         3.6071
## nodefactor.agecat.3 24.8936 28.10   0.4391         4.0713
## absdiff.sqrtage      8.5795 16.94   0.2647         1.2822
## 
## 2. Quantiles for each variable:
## 
##                       2.5%     25%     50%   75% 97.5%
## edges               -38.73   8.266 32.2661 57.27 97.27
## nodefactor.agecat.1 -22.69  -8.690 -1.6899  5.31 19.31
## nodefactor.agecat.2 -53.90 -18.900 -0.9001 17.10 52.72
## nodefactor.agecat.3 -25.25   3.752 22.7515 44.75 82.75
## absdiff.sqrtage     -24.39  -2.906  8.2595 19.78 42.00
## 
## 
## Sample statistics cross-correlations:
##                         edges nodefactor.agecat.1 nodefactor.agecat.2
## edges               1.0000000          0.18370249           0.5944878
## nodefactor.agecat.1 0.1837025          1.00000000           0.1584014
## nodefactor.agecat.2 0.5944878          0.15840143           1.0000000
## nodefactor.agecat.3 0.5041297         -0.05212837           0.1095053
## absdiff.sqrtage     0.6493379          0.12062195           0.3810586
##                     nodefactor.agecat.3 absdiff.sqrtage
## edges                        0.50412968       0.6493379
## nodefactor.agecat.1         -0.05212837       0.1206219
## nodefactor.agecat.2          0.10950531       0.3810586
## nodefactor.agecat.3          1.00000000       0.3318394
## absdiff.sqrtage              0.33183944       1.0000000
## 
## Sample statistics auto-correlation:
## Chain 1 
##              edges nodefactor.agecat.1 nodefactor.agecat.2
## Lag 0    1.0000000           1.0000000           1.0000000
## Lag 1024 0.9643615           0.8577625           0.9583287
## Lag 2048 0.9290293           0.7312741           0.9207521
## Lag 3072 0.8967385           0.6168457           0.8865835
## Lag 4096 0.8655751           0.5187668           0.8536933
## Lag 5120 0.8368374           0.4373850           0.8251907
##          nodefactor.agecat.3 absdiff.sqrtage
## Lag 0              1.0000000       1.0000000
## Lag 1024           0.9769993       0.9182090
## Lag 2048           0.9546679       0.8422038
## Lag 3072           0.9332535       0.7725440
## Lag 4096           0.9136152       0.7083530
## Lag 5120           0.8945763       0.6515551
## 
## Sample statistics burn-in diagnostic (Geweke):
## Chain 1 
## 
## Fraction in 1st window = 0.1
## Fraction in 2nd window = 0.5 
## 
##               edges nodefactor.agecat.1 nodefactor.agecat.2 
##             -3.7935              0.8007             -0.6378 
## nodefactor.agecat.3     absdiff.sqrtage 
##             -1.6268             -1.0726 
## 
## Individual P-values (lower = worse):
##               edges nodefactor.agecat.1 nodefactor.agecat.2 
##        0.0001485492        0.4232882134        0.5236156550 
## nodefactor.agecat.3     absdiff.sqrtage 
##        0.1037793669        0.2834459697 
## Joint P-value (lower = worse):  0.1938805 .

## 
## MCMC diagnostics shown here are from the last round of simulation, prior to computation of final parameter estimates. Because the final estimates are refinements of those used for this simulation run, these diagnostics may understate model performance. To directly assess the performance of the final model on in-model statistics, please use the GOF command: gof(ergmFitObject, GOF=~model).

“Other” formation model:

note these models also don’t have contrainst based on degree in marcoh network

Nodecov(age)

## Warning in ergm.ego(egodat_other ~ edges + nodecov("age") +
## absdiff("sqrtage") + : Using a smaller pseudopopulation size than sample
## size usually does not make sense.
## Constructing pseudopopulation network.
## Note: Constructed network has size 5006, different from requested 10000. Estimation should not be meaningfully affected.
## Unable to match target stats. Using MCMLE estimation.
## Starting maximum pseudolikelihood estimation (MPLE):
## Evaluating the predictor and response matrix.
## Maximizing the pseudolikelihood.
## Finished MPLE.
## Starting Monte Carlo maximum likelihood estimation (MCMLE):
## Iteration 1 of at most 20:
## Optimizing with step length 0.204291736580097.
## The log-likelihood improved by 3.608.
## Iteration 2 of at most 20:
## Optimizing with step length 0.284888209675062.
## The log-likelihood improved by 3.383.
## Iteration 3 of at most 20:
## Optimizing with step length 0.436574121894018.
## The log-likelihood improved by 3.681.
## Iteration 4 of at most 20:
## Optimizing with step length 0.779438852365321.
## The log-likelihood improved by 3.19.
## Iteration 5 of at most 20:
## Optimizing with step length 1.
## The log-likelihood improved by 0.009037.
## Step length converged once. Increasing MCMC sample size.
## Iteration 6 of at most 20:
## Optimizing with step length 1.
## The log-likelihood improved by 0.003768.
## Step length converged twice. Stopping.
## Finished MCMLE.
## This model was fit using MCMC.  To examine model diagnostics and
## check for degeneracy, use the mcmc.diagnostics() function.
## 
## ==========================
## Summary of model fit
## ==========================
## 
## Formula:   egodat_other ~ edges + nodecov("age") + absdiff("sqrtage") + 
##     concurrent + offset(nodematch("male", diff = FALSE))
## 
## Iterations:  6 out of 20 
## 
## Monte Carlo MLE Results:
##                         Estimate Std. Error MCMC % z value Pr(>|z|)    
## offset(netsize.adj)    -8.518392   0.000000      0    -Inf   <1e-04 ***
## edges                   4.111824   0.107959      1   38.09   <1e-04 ***
## nodecov.age            -0.061302   0.001666      1  -36.80   <1e-04 ***
## absdiff.sqrtage        -2.911515   0.065375      0  -44.53   <1e-04 ***
## concurrent             -1.103946   0.091461      0  -12.07   <1e-04 ***
## offset(nodematch.male)      -Inf   0.000000      0    -Inf   <1e-04 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
##  The following terms are fixed by offset and are not estimated:
##   offset(netsize.adj) offset(nodematch.male)
## Sample statistics summary:
## 
## Iterations = 16384:4209664
## Thinning interval = 1024 
## Number of chains = 1 
## Sample size per chain = 4096 
## 
## 1. Empirical mean and standard deviation for each variable,
##    plus standard error of the mean:
## 
##                    Mean      SD Naive SE Time-series SE
## edges            0.1611  17.473  0.27302         0.7185
## nodecov.age     16.2576 951.540 14.86781        32.9492
## absdiff.sqrtage -0.2234   7.601  0.11876         0.2115
## concurrent       0.3120   5.949  0.09295         0.1773
## 
## 2. Quantiles for each variable:
## 
##                     2.5%      25%     50%     75%   97.5%
## edges             -33.19  -12.195 -0.1946  11.805   34.81
## nodecov.age     -1820.37 -629.373 18.6272 658.627 1919.25
## absdiff.sqrtage   -15.96   -5.194 -0.1934   4.994   14.33
## concurrent        -12.17   -4.169  0.8306   4.831   11.83
## 
## 
## Sample statistics cross-correlations:
##                     edges nodecov.age absdiff.sqrtage concurrent
## edges           1.0000000   0.9641743       0.6713954  0.5105704
## nodecov.age     0.9641743   1.0000000       0.6582037  0.4407747
## absdiff.sqrtage 0.6713954   0.6582037       1.0000000  0.3250011
## concurrent      0.5105704   0.4407747       0.3250011  1.0000000
## 
## Sample statistics auto-correlation:
## Chain 1 
##              edges nodecov.age absdiff.sqrtage concurrent
## Lag 0    1.0000000   1.0000000      1.00000000  1.0000000
## Lag 1024 0.6793662   0.5976646      0.43949156  0.4407176
## Lag 2048 0.4894343   0.3822709      0.22432399  0.2574006
## Lag 3072 0.3764409   0.2645224      0.12844998  0.1590593
## Lag 4096 0.3053709   0.2003968      0.10671811  0.1208386
## Lag 5120 0.2478397   0.1501255      0.07803881  0.1044248
## 
## Sample statistics burn-in diagnostic (Geweke):
## Chain 1 
## 
## Fraction in 1st window = 0.1
## Fraction in 2nd window = 0.5 
## 
##           edges     nodecov.age absdiff.sqrtage      concurrent 
##        -0.53744         0.06666        -3.15729        -0.90844 
## 
## Individual P-values (lower = worse):
##           edges     nodecov.age absdiff.sqrtage      concurrent 
##      0.59096090      0.94685253      0.00159243      0.36364736 
## Joint P-value (lower = worse):  0.00453261 .

## 
## MCMC diagnostics shown here are from the last round of simulation, prior to computation of final parameter estimates. Because the final estimates are refinements of those used for this simulation run, these diagnostics may understate model performance. To directly assess the performance of the final model on in-model statistics, please use the GOF command: gof(ergmFitObject, GOF=~model).

Nodefactor(agecat)

## Warning in ergm.ego(egodat_other ~ edges + nodefactor("agecat", levels =
## c(1:4)) + : Using a smaller pseudopopulation size than sample size usually
## does not make sense.
## Constructing pseudopopulation network.
## Note: Constructed network has size 5006, different from requested 10000. Estimation should not be meaningfully affected.
## Unable to match target stats. Using MCMLE estimation.
## Starting maximum pseudolikelihood estimation (MPLE):
## Evaluating the predictor and response matrix.
## Maximizing the pseudolikelihood.
## Finished MPLE.
## Starting Monte Carlo maximum likelihood estimation (MCMLE):
## Iteration 1 of at most 20:
## Optimizing with step length 0.209575703549554.
## The log-likelihood improved by 3.358.
## Iteration 2 of at most 20:
## Optimizing with step length 0.302829116735493.
## The log-likelihood improved by 2.99.
## Iteration 3 of at most 20:
## Optimizing with step length 0.44983110233985.
## The log-likelihood improved by 3.188.
## Iteration 4 of at most 20:
## Optimizing with step length 0.903618676598601.
## The log-likelihood improved by 3.733.
## Iteration 5 of at most 20:
## Optimizing with step length 1.
## The log-likelihood improved by 0.5363.
## Step length converged once. Increasing MCMC sample size.
## Iteration 6 of at most 20:
## Optimizing with step length 1.
## The log-likelihood improved by 0.09736.
## Step length converged twice. Stopping.
## Finished MCMLE.
## This model was fit using MCMC.  To examine model diagnostics and
## check for degeneracy, use the mcmc.diagnostics() function.
## 
## ==========================
## Summary of model fit
## ==========================
## 
## Formula:   egodat_other ~ edges + nodefactor("agecat", levels = c(1:4)) + 
##     absdiff("sqrtage") + concurrent + offset(nodematch("male", 
##     diff = FALSE))
## 
## Iterations:  6 out of 20 
## 
## Monte Carlo MLE Results:
##                        Estimate Std. Error MCMC % z value Pr(>|z|)    
## offset(netsize.adj)    -8.51839    0.00000      0    -Inf   <1e-04 ***
## edges                  -0.64490    0.04943      0 -13.046   <1e-04 ***
## nodefactor.agecat.1     1.34147    0.04047      1  33.147   <1e-04 ***
## nodefactor.agecat.2     1.10352    0.03876      1  28.467   <1e-04 ***
## nodefactor.agecat.3     0.66361    0.03504      1  18.938   <1e-04 ***
## nodefactor.agecat.4     0.34566    0.04200      0   8.229   <1e-04 ***
## absdiff.sqrtage        -2.88201    0.06721      0 -42.881   <1e-04 ***
## concurrent             -1.14399    0.08878      0 -12.886   <1e-04 ***
## offset(nodematch.male)     -Inf    0.00000      0    -Inf   <1e-04 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
##  The following terms are fixed by offset and are not estimated:
##   offset(netsize.adj) offset(nodematch.male)
## Sample statistics summary:
## 
## Iterations = 16384:4209664
## Thinning interval = 1024 
## Number of chains = 1 
## Sample size per chain = 4096 
## 
## 1. Empirical mean and standard deviation for each variable,
##    plus standard error of the mean:
## 
##                        Mean     SD Naive SE Time-series SE
## edges                1.2819 17.294  0.27022         0.8176
## nodefactor.agecat.1  2.6692 13.940  0.21782         1.1355
## nodefactor.agecat.2 -4.0351 17.525  0.27382         0.9862
## nodefactor.agecat.3  1.4807 14.011  0.21892         0.6572
## nodefactor.agecat.4  1.9532 11.027  0.17229         0.3764
## absdiff.sqrtage     -0.3529  7.691  0.12017         0.2392
## concurrent          -0.8896  6.100  0.09532         0.2299
## 
## 2. Quantiles for each variable:
## 
##                       2.5%     25%     50%    75%  97.5%
## edges               -34.19 -10.195  1.8054 12.805 33.805
## nodefactor.agecat.1 -26.91  -6.913  3.0874 13.087 27.087
## nodefactor.agecat.2 -39.09 -15.094 -4.0937  7.906 30.906
## nodefactor.agecat.3 -27.27  -7.643  1.3572 11.357 27.982
## nodefactor.agecat.4 -21.21  -5.210  2.7896  9.790 22.790
## absdiff.sqrtage     -15.85  -5.295 -0.1209  4.843 14.526
## concurrent          -13.17  -5.169 -1.1694  3.831  9.831
## 
## 
## Sample statistics cross-correlations:
##                         edges nodefactor.agecat.1 nodefactor.agecat.2
## edges               1.0000000         0.471269288          0.58871507
## nodefactor.agecat.1 0.4712693         1.000000000          0.09816441
## nodefactor.agecat.2 0.5887151         0.098164412          1.00000000
## nodefactor.agecat.3 0.4866158         0.043884665          0.07085743
## nodefactor.agecat.4 0.4100871        -0.001948945          0.05160447
## absdiff.sqrtage     0.6886763         0.320036234          0.38510857
## concurrent          0.4816460         0.298744217          0.43518962
##                     nodefactor.agecat.3 nodefactor.agecat.4
## edges                        0.48661575         0.410087088
## nodefactor.agecat.1          0.04388467        -0.001948945
## nodefactor.agecat.2          0.07085743         0.051604472
## nodefactor.agecat.3          1.00000000         0.067289692
## nodefactor.agecat.4          0.06728969         1.000000000
## absdiff.sqrtage              0.36007275         0.293847899
## concurrent                   0.21452611         0.105806034
##                     absdiff.sqrtage concurrent
## edges                     0.6886763  0.4816460
## nodefactor.agecat.1       0.3200362  0.2987442
## nodefactor.agecat.2       0.3851086  0.4351896
## nodefactor.agecat.3       0.3600728  0.2145261
## nodefactor.agecat.4       0.2938479  0.1058060
## absdiff.sqrtage           1.0000000  0.3135916
## concurrent                0.3135916  1.0000000
## 
## Sample statistics auto-correlation:
## Chain 1 
##              edges nodefactor.agecat.1 nodefactor.agecat.2
## Lag 0    1.0000000           1.0000000           1.0000000
## Lag 1024 0.6686986           0.8681123           0.8261418
## Lag 2048 0.4961538           0.7819380           0.6996014
## Lag 3072 0.4034751           0.7127612           0.6075414
## Lag 4096 0.3426658           0.6579238           0.5308334
## Lag 5120 0.2897890           0.6093251           0.4626872
##          nodefactor.agecat.3 nodefactor.agecat.4 absdiff.sqrtage
## Lag 0              1.0000000           1.0000000       1.0000000
## Lag 1024           0.7238485           0.5948038       0.4254256
## Lag 2048           0.5552313           0.3990582       0.2356761
## Lag 3072           0.4437020           0.2789888       0.1697984
## Lag 4096           0.3640360           0.1960868       0.1373669
## Lag 5120           0.2958634           0.1422103       0.0945788
##          concurrent
## Lag 0     1.0000000
## Lag 1024  0.4966418
## Lag 2048  0.3078943
## Lag 3072  0.2249880
## Lag 4096  0.1757426
## Lag 5120  0.1614681
## 
## Sample statistics burn-in diagnostic (Geweke):
## Chain 1 
## 
## Fraction in 1st window = 0.1
## Fraction in 2nd window = 0.5 
## 
##               edges nodefactor.agecat.1 nodefactor.agecat.2 
##             -1.4246             -2.9090              0.1335 
## nodefactor.agecat.3 nodefactor.agecat.4     absdiff.sqrtage 
##              0.9711             -1.4368             -1.6917 
##          concurrent 
##             -1.4674 
## 
## Individual P-values (lower = worse):
##               edges nodefactor.agecat.1 nodefactor.agecat.2 
##         0.154270565         0.003626204         0.893764616 
## nodefactor.agecat.3 nodefactor.agecat.4     absdiff.sqrtage 
##         0.331477249         0.150788470         0.090708972 
##          concurrent 
##         0.142268348 
## Joint P-value (lower = worse):  0.06146616 .

## 
## MCMC diagnostics shown here are from the last round of simulation, prior to computation of final parameter estimates. Because the final estimates are refinements of those used for this simulation run, these diagnostics may understate model performance. To directly assess the performance of the final model on in-model statistics, please use the GOF command: gof(ergmFitObject, GOF=~model).

NetDX

MARCOH 10,000 node netwoks

Nodecov(age)

Static

## 
## Network Diagnostics
## -----------------------
## - Simulating 10000 networks
## - Calculating formation statistics
## EpiModel Network Diagnostics
## =======================
## Diagnostic Method: Static
## Simulations: 10000
## 
## Formation Diagnostics
## ----------------------- 
##                           Target  Sim Mean Pct Diff   Sim SD
## edges                   1140.799  1139.403   -0.122   20.787
## nodecov.age            74493.142 74363.184   -0.174 1334.808
## absdiff.sqrtage          305.576   307.618    0.668   10.641
## offset(nodematch.male)        NA     0.000       NA    0.000
## offset(concurrent)            NA     0.000       NA    0.000
## meandeg                       NA     0.455       NA    0.008
## concurrent                    NA     0.000       NA    0.000

Dynamic

## 
## Network Diagnostics
## -----------------------
## - Simulating 5 networks
##   |*****|
## - Calculating formation statistics
## - Calculating duration statistics
##   |*****|
## - Calculating dissolution statistics
##   |*****|
## 
## EpiModel Network Diagnostics
## =======================
## Diagnostic Method: Dynamic
## Simulations: 5
## Time Steps per Sim: 5000
## 
## Formation Diagnostics
## ----------------------- 
##                    Target  Sim Mean Pct Diff   Sim SD
## edges            1140.799  1126.836   -1.224   18.353
## meandeg                NA     0.450       NA    0.007
## concurrent             NA     0.000       NA    0.000
## nodecov.age     74493.142 73589.759   -1.213 1210.918
## absdiff.sqrtage   305.576   303.219   -0.771   10.331
## 
## Dissolution Diagnostics
## ----------------------- 
##                 Target Sim Mean Pct Diff  Sim SD
## Edge Duration  463.528  418.056   -9.810 413.278
## Pct Edges Diss   0.002    0.002   -0.351   0.001

Nodefactor(agecat)

Static

## 
## Network Diagnostics
## -----------------------
## - Simulating 10000 networks
## - Calculating formation statistics
## EpiModel Network Diagnostics
## =======================
## Diagnostic Method: Static
## Simulations: 10000
## 
## Formation Diagnostics
## ----------------------- 
##                          Target Sim Mean Pct Diff Sim SD
## edges                  1140.799 1140.027   -0.068 17.557
## nodefactor.agecat.1      31.615   31.875    0.822  6.284
## nodefactor.agecat.2     259.360  258.316   -0.403 14.998
## nodefactor.agecat.3     486.403  484.052   -0.483 16.221
## absdiff.sqrtage         305.576  306.268    0.227 10.055
## offset(nodematch.male)       NA    0.000       NA  0.000
## offset(concurrent)           NA    0.000       NA  0.000
## meandeg                      NA    0.455       NA  0.007
## concurrent                   NA    0.000       NA  0.000

Dynamic

## 
## Network Diagnostics
## -----------------------
## - Simulating 5 networks
##   |*****|
## - Calculating formation statistics
## - Calculating duration statistics
##   |*****|
## - Calculating dissolution statistics
##   |*****|
## 
## EpiModel Network Diagnostics
## =======================
## Diagnostic Method: Dynamic
## Simulations: 5
## Time Steps per Sim: 5000
## 
## Formation Diagnostics
## ----------------------- 
##                       Target Sim Mean Pct Diff Sim SD
## edges               1140.799 1127.615   -1.156 19.219
## meandeg                   NA    0.451       NA  0.008
## concurrent                NA    0.000       NA  0.000
## nodefactor.agecat.1   31.615   31.906    0.920  7.233
## nodefactor.agecat.2  259.360  254.924   -1.710 13.671
## nodefactor.agecat.3  486.403  479.107   -1.500 15.363
## absdiff.sqrtage      305.576  299.681   -1.929 10.692
## 
## Dissolution Diagnostics
## ----------------------- 
##                 Target Sim Mean Pct Diff  Sim SD
## Edge Duration  463.528  414.706  -10.533 407.002
## Pct Edges Diss   0.002    0.002    0.196   0.001

OTHER 10,000 node networks

Nodecov(age)

Static

## 
## Network Diagnostics
## -----------------------
## - Simulating 10000 networks
## - Calculating formation statistics
## EpiModel Network Diagnostics
## =======================
## Diagnostic Method: Static
## Simulations: 10000
## 
## Formation Diagnostics
## ----------------------- 
##                           Target  Sim Mean Pct Diff  Sim SD
## edges                    398.805   398.420   -0.097  17.941
## nodecov.age            20625.627 20599.740   -0.126 986.277
## absdiff.sqrtage          115.858   115.919    0.052   7.753
## concurrent                32.831    32.794   -0.112   5.997
## offset(nodematch.male)        NA     0.000       NA   0.000
## meandeg                       NA     0.159       NA   0.007

Dynamic

## 
## Network Diagnostics
## -----------------------
## - Simulating 5 networks
##   |*****|
## - Calculating formation statistics
## - Calculating duration statistics
##   |*****|
## - Calculating dissolution statistics
##   |*****|
## 
## EpiModel Network Diagnostics
## =======================
## Diagnostic Method: Dynamic
## Simulations: 5
## Time Steps per Sim: 5000
## 
## Formation Diagnostics
## ----------------------- 
##                    Target  Sim Mean Pct Diff  Sim SD
## edges             398.805   398.841    0.009  17.396
## meandeg                NA     0.159       NA   0.007
## concurrent         32.831    33.098    0.816   6.237
## nodecov.age     20625.627 20630.129    0.022 967.800
## absdiff.sqrtage   115.858   115.627   -0.200   7.420
## 
## Dissolution Diagnostics
## ----------------------- 
##                Target Sim Mean Pct Diff Sim SD
## Edge Duration  94.848   93.137   -1.804 92.597
## Pct Edges Diss  0.011    0.011   -0.175  0.005

Nodefactor(agecat)

Static

## 
## Network Diagnostics
## -----------------------
## - Simulating 10000 networks
## - Calculating formation statistics
## EpiModel Network Diagnostics
## =======================
## Diagnostic Method: Static
## Simulations: 10000
## 
## Formation Diagnostics
## ----------------------- 
##                         Target Sim Mean Pct Diff Sim SD
## edges                  398.805  399.576    0.193 17.590
## nodefactor.agecat.1    167.087  165.801   -0.770 13.886
## nodefactor.agecat.2    251.906  252.045    0.055 17.391
## nodefactor.agecat.3    156.357  158.498    1.369 13.852
## nodefactor.agecat.4     98.790   99.182    0.397 11.333
## absdiff.sqrtage        115.858  116.566    0.611  7.835
## concurrent              32.831   33.196    1.113  6.161
## offset(nodematch.male)      NA    0.000       NA  0.000
## meandeg                     NA    0.160       NA  0.007

#### Dynamic

## 
## Network Diagnostics
## -----------------------
## - Simulating 5 networks
##   |*****|
## - Calculating formation statistics
## - Calculating duration statistics
##   |*****|
## - Calculating dissolution statistics
##   |*****|
## 
## EpiModel Network Diagnostics
## =======================
## Diagnostic Method: Dynamic
## Simulations: 5
## Time Steps per Sim: 5000
## 
## Formation Diagnostics
## ----------------------- 
##                      Target Sim Mean Pct Diff Sim SD
## edges               398.805  401.428    0.658 18.401
## meandeg                  NA    0.160       NA  0.007
## concurrent           32.831   33.620    2.404  6.135
## nodefactor.agecat.1 167.087  165.607   -0.886 13.730
## nodefactor.agecat.2 251.906  253.866    0.778 17.796
## nodefactor.agecat.3 156.357  158.154    1.149 13.461
## absdiff.sqrtage     115.858  117.287    1.233  8.382
## nodefactor.agecat.4  98.790       NA       NA     NA
## 
## Dissolution Diagnostics
## ----------------------- 
##                Target Sim Mean Pct Diff Sim SD
## Edge Duration  94.848   93.178   -1.760 92.464
## Pct Edges Diss  0.011    0.011   -0.201  0.005